<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>巫谢的博客</title>
    <!--
    <link rel="stylesheet" href="/Public/bootstrap/css/bootstrap.min.css">
    <script src="/Public/bootstrap/scripts/jquery.min.js"></script>
    <script src="/Public/bootstrap/js/bootstrap.min.js"></script>
    -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
    <script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="http://pingendo.github.io/pingendo-bootstrap/themes/default/bootstrap.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="section">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <h1 class="text-left">巫谢的博客</h1>
                <ul class="text-right">
                    <li>欢迎您：<?php echo ($admin_name); ?></li>
                    <li><a href="/" target="_blank">前台首页</a></li>
                    <li><a href="<?php echo U('Login/logout');?>">退出登录</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
<div class="section">
    <div class="container">
        <div class="row">
            <div class="col-md-2">
                <p>菜单</p>
                <ul class="nav nav-pills nav-stacked">
                    <li><a href="<?php echo U('Index /index');?>">后台首页</a></li>
                    <li><a href="#">新增博文</a></li>
                    <li><a href="#">博文列表</a></li>
                    <li><a href="<?php echo U('Category/add');?>">新增分类</a></li>
                    <li><a href="<?php echo U('Category/index');?>">分类列表</a></li>
                    <li><a href="#">回收站</a></li>
                </ul>
            </div>
            <div class="col-md-10">
                <div>
    <form method="post">
        <input type="hidden" name="id" value="<?php echo ($id); ?>">
        <table>
            <tr><th>上级分类：</th><td>
                <select name="pid">
                    <option value="0">顶级分类</option>
                    <?php if(is_array($category)): foreach($category as $key=>$v): ?><option value="<?php echo ($v["id"]); ?>" <?php if(($v["id"]) == $pid): ?>selected<?php endif; ?> ><?php echo str_repeat('— ',$v['level']); echo ($v["name"]); ?></option><?php endforeach; endif; ?>
                </select>
            </td></tr>
            <tr><th>分类名称：</th><td><input type="text" name="name" value="<?php echo ($name); ?>"></td></tr>
        </table>
        <div>
            <input type="submit" value="修改分类">
            <input type="reset" value="重新填写">
        </div>
    </form>
</div>
            </div>
        </div>
    </div>
</div>
<footer class="section section-primary">
    <div class="container">

    </div>
</footer>
</body>
</html>